home *** CD-ROM | disk | FTP | other *** search
/ Internet Surfer 2.0 / Internet Surfer 2.0 (Wayzata Technology) (1996).iso / pc / text / mac / faqs.523 < prev    next >
Text File  |  1996-02-12  |  28KB  |  727 lines

  1. Frequently Asked Questions (FAQS);faqs.523
  2.  
  3.  
  4.  
  5. Archive-name: tv/abbrevs
  6.  
  7. [Last change - 11/30/92]
  8. [Changes since last posting - Added new abbreviations for Highlander (HL),
  9.                               Forever Knight (FK), and Babylon 5 (B5).
  10.                               Deleted abbreviations for shows no longer on
  11.                               the air: Eerie, Indiana (EEI) and Parker
  12.                               Lewis Can't Lose (PLCL).  (If Parker Lewis
  13.                               hasn't been cancelled, it will need a new
  14.                               abbreviation anyway.)]
  15.  
  16. Rec.arts.tv is a high volume newsgroup with a wide variety of discussed
  17. topics.  However, a few topics generate more traffic than others.  In order
  18. to allow those who use rn or some other method of pre-selecting articles to
  19. filter out (or save away) postings about these heavy traffic subjects, an
  20. abbreviation scheme has been created.  Please help out by starting your
  21. subject line with one of the following abbreviations when posting about
  22. these topics. For example:
  23.  
  24. Subject: NX - Dancing Bears
  25.  
  26. or
  27.  
  28. Subject: QL: Scott Bakula is PERFECT
  29.  
  30. New abbreviations will be added as needed.  Send suggestions directly to
  31. me, and I'll add them to the list.  Objections to any abbreviations should
  32. probably be posted so that a consensus may be reached.  Old abbreviations
  33. will be deleted when no longer necessary.
  34.  
  35. B5    - Babylon 5
  36. DN    - Dinosaurs
  37. FK    - Forever Knight
  38. HL    - Highlander
  39. LAL    - LA Law
  40. L&O    - Law and Order
  41. MWC    - Married With Children
  42. MB    - Murphy Brown
  43. MST    - Mystery Science Theatre 3000
  44. NX    - Northern Exposure
  45. QL     - Quantum Leap
  46. RD    - Reasonable Doubts
  47. SMP    - The Simpsons
  48. SNL    - Saturday Night Live
  49. WKRP    - WKRP in Cincinnati
  50. WY    - Wonder Years
  51. YIJ    - The Young Indiana Jones Chronicles
  52.  
  53. Some of these shows and as well as others are also discussed on various alt
  54. groups and mailing lists.  These are detailed as completely as possible in
  55. "TV Discussion Groups, Etc." which is posted periodically to rec.arts.tv.
  56. --
  57.  
  58.                                             Melissa
  59.                                             mwauford@utkvx.utk.edu
  60.  
  61. Xref: bloom-picayune.mit.edu comp.lang.tcl:2075 news.answers:4539
  62. Newsgroups: comp.lang.tcl,news.answers
  63. Path: bloom-picayune.mit.edu!enterpoop.mit.edu!spool.mu.edu!caen!malgudi.oar.net!chemabs!lvirden
  64. From: lvirden@cas.org (Larry W. Virden)
  65. Subject: comp.lang.tcl Frequently Asked Questions (1/3)
  66.      (Last updated: November 8, 1992)
  67. Message-ID: <tcl.p1_724079551@cas.org>
  68. Followup-To: comp.lang.tcl
  69. Summary: A regular posting of the comp.lang.tcl Frequently Asked Questions
  70.     (FAQ) and their answers.  This is the first of three parts.
  71. Originator: lwv26@lwv26aws
  72. Keywords: tcl, extended tcl, tk, expect
  73. Sender: lvirden@cas.org
  74. Supersedes: <tcl.p1_721227419@cas.org>
  75. Reply-To: lvirden@cas.org (Larry W. Virden)
  76. Organization: Chemical Abstracts Service
  77. Date: Fri, 11 Dec 1992 13:12:40 GMT
  78. Approved: news-answers-request@MIT.Edu
  79. Expires: Sun, 24 Jan 1993 13:12:31 GMT
  80. Lines: 308
  81.  
  82. Archive-name: tcl-faq/part1
  83. Version: 2.5
  84. Last-modified: November 8, 1992
  85.  
  86.  
  87. Index of questions:
  88.  
  89. 0. Origin of the comp.lang.tcl FAQ information.
  90. 1. What is Tcl?     Tk?  Extended Tcl?  How does Tcl compare against language
  91.     XXX?
  92. 2. Do these packages run on my machine?
  93.     a. Unix
  94.     b. MacOS
  95.     c. MS-DOS
  96.     d. VMS
  97. 3. Other than C, What languages can talk to tcl/tk?
  98.     a. Shell
  99.     b. C++
  100.         c. Modula-3
  101. 4. Is there a bibliography of material relating to these programs?
  102. 5. Where do I report problems, bugs, or enhancements - or -
  103.     What is comp.lang.tcl?
  104. 6. Where can I find the FAQ and who do I contact for more information
  105.     about it?
  106.     
  107. End of FAQ Index
  108.  
  109. ------------------------------
  110. Subject: -0- Origin of the comp.lang.tcl FAQ information.
  111.  
  112. The information in this set of FAQs comes from 3 sources.  The primary
  113. source of information is the group itself - I spent (much too much) time
  114. each month culling through what I feel are some of the best answers,
  115. gathering up new information on ports, etc. and adding it here.  I also
  116. gather together new application information and add it as best I can.
  117. The next most predominant source of information comes from the authors
  118. of the various software packages.  Finally, a small amount comes from
  119. my personal experiences.
  120.  
  121. I am always on the search for folk to assist in the maintenance of these
  122. FAQs.  In fact, if you feel that you would like to coordinate this
  123. effort, PLEASE let me know!
  124.  
  125. Subject: -1- What is Tcl?  Tk?  Extended Tcl?  How does Tcl compare
  126.         against language XXX?
  127.  
  128.     Tcl (version 6.4) stands for ``tool command language'' and is
  129. pronounced ``tickle.'' It is actually two things: a language and a
  130. library.  First, Tcl is a simple textual language, intended primarily
  131. for issuing commands to interactive programs such as text editors,
  132. debuggers, illustrators, and shells.  It has a simple syntax and is
  133. also programmable, so Tcl users can write command procedures to provide
  134. more powerful commands than those in the built-in set.
  135.  
  136.     Second, Tcl is a library package that can be embedded in
  137. application programs.  The Tcl library consists of a parser for the Tcl
  138. language, routines to implement the Tcl built-in commands, and
  139. procedures that allow each application to extend Tcl with additional
  140. commands specific to that application.  The application program
  141. generates Tcl commands and passes them to the Tcl parser for
  142. execution.  Commands may be generated by reading characters from an
  143. input source, or by associating command strings with elements of the
  144. application's user interface, such as menu entries, buttons, or
  145. keystrokes.  When the Tcl library receives commands it parses them into
  146. component fields and executes built-in commands directly.  For commands
  147. implemented by the application, Tcl calls back to the application to
  148. execute the commands.  In many cases commands will invoke recursive
  149. invocations of the Tcl interpreter by passing in additional strings to
  150. execute (procedures, looping commands, and conditional commands all
  151. work in this way).
  152.  
  153.     An application program gains three advantages by using Tcl for
  154. its command language.  First, Tcl provides a standard syntax:  once
  155. users know Tcl, they will be able to issue commands easily to any
  156. Tcl-based application.  Second, Tcl provides programmability.  All a
  157. Tcl application needs to do is to implement a few application-specific
  158. low-level commands.  Tcl provides many utility commands plus a general
  159. programming interface for building up complex command procedures.  By
  160. using Tcl, applications need not re-implement these features.  Third,
  161. extensions to Tcl, such as the Tk toolkit, provide mechanisms for
  162. communicating between applications by sending Tcl commands back and
  163. forth.  The common Tcl language framework makes it easier for
  164. applications to communicate with one another.
  165.  
  166.     Tk 2.3 - an extension to Tcl which provides the programmer with
  167. an interface to the X11 windowing system.  Note that many users will
  168. encounter Tk via the ``wish'' command.  Wish is a simple windowing
  169. shell which permits the user to write Tcl applications in a prototyping
  170. environment.
  171.  
  172.     Extended Tcl (tclX) 6.4c-p1 - This extended set of commands are
  173. provided by NeoSoft, and provide additional Unix system interfaces to
  174. the Tcl programmer.  Many users will encounter Tcl via the ``tcl''
  175. command - an interactive Tcl command interpreter.
  176.  
  177.  ?? I do not have any info written yet for the language comparisons ??
  178.  
  179. ------------------------------
  180. Subject: -2- Do these packages run on my machine?
  181.  
  182. a. Unix
  183.  
  184.     Tcl runs on Suns and SunOS, DECstations running Ultrix, Dec
  185. VAXen running Ultrix or BSD, 386s running SCO Unix, Xenix, Bell-Tech,
  186. Silicon Graphics running IRIX, HPs running HP-UX, Sequent Symmetry
  187. running Dynix.  See the porting section below for info on porting the
  188. code to VMS as well.
  189.  
  190.     Tk (being based on Tcl) requires X11R4 or better as the only additional
  191. software requirement.
  192.  
  193. b. MacOS
  194.  
  195.     Contact W. Ross Brown <ross@bnr.ca> for the current status of
  196. the Tcl MacOS port.  Ross has a mailing list for discussion on that
  197. topic.  Also, "Eric W. Sink" <e-sink@uiuc.edu> is working on a port
  198. which includes some tclX extensions as well as some Mac-specific extensions.
  199.  
  200. c. MS-DOS
  201.  
  202.     Two ports are available.  One unsupported port of Tcl and Extended
  203. Tcl 6.0, done by "Karl Lehenbauer" <Karl@NeoSoft.com>, is available on
  204. barkley.berkeley.edu.
  205.  
  206.     The other port of TCL V6.2 was done by
  207. "John Martin" <johnm@cajal.uoregon.edu> and is available via FTP from
  208. cajal.uoregon.edu.
  209.  
  210. d. VMS
  211.  
  212.     A port of TCL 6.2 and Tk 1.4 to VMS was done by Angel Li
  213. <angel@flipper.rsmas.miami.edu>.  The files are
  214. mango.rsmas.miami.edu:pub/tcl-vms.bck.Z and
  215. mango.rsmas.miami.edu:pub/tk-vms.bck.Z
  216.  
  217. and are compressed with the Unix compress command.  The files are
  218. VMS BACKUP files.
  219.  
  220.  
  221. ------------------------------
  222. Subject: -3- Other than C, What languages can talk to tcl/tk?
  223.  
  224. a. Shell
  225.  
  226.     There are two standard interfaces which are shell-like.  The
  227. first is wish, which is a windowing shell like interface that is a part
  228. of the Tk package.  The second is tcl, a line command interpreter that
  229. is part of the Extended TCL package.
  230.  
  231. b. C++
  232.  
  233.     Check out tcl++.h in Extended Tcl.  Based on an original
  234. implementation by Parag Patel, it defines a Tcl interpreter class by
  235. which Tcl interpreters can be created as objects under C++.
  236.  
  237.     Mark Diekhans and Karl Lehenbauer have used this, in
  238. combination with the handle facility in Extended Tcl, to build Tcl
  239. commands around C++ classes.
  240.  
  241.     The Tcl handle facility provides a way to manage table entries
  242. that can be referenced by a textual handle from Tcl code.  This is
  243. provided for applications that need to create data structures in one
  244. command, return a reference (i.e. pointer) to that particular data
  245. structure and then access that data structure in other commands.  An
  246. example application is file handles.
  247.  
  248.     A handle table was built containing pointers to the instances
  249. of a class that were to be accessed from Tcl, say a class `foo_cl', and
  250. then a "new" command defined that created an instance of that class and
  251. returned a Tcl handle to it.  The handle could then passed among Tcl
  252. commands that accessed each member function.  The handle is in effect
  253. an explicit `this' pointer.
  254.  
  255.     For example:
  256.  
  257.      set obj [foo_cl::new]
  258.      foo_cl::baz $obj "Hello world"
  259.      foo_cl::delete $obj
  260.  
  261. It's not totally object-oriented, but it's still very usable.
  262.  
  263. c. Modula-3
  264.  
  265. Norman Ramsey <elan.uucp!nr> says:
  266.  
  267.     A long time back, Eric Muller posted a Modula-3 interface to
  268. the C TCL library.  I wrote down a Modula-3/TCL interface that used
  269. Modula-3 types rather than C types, and that used objects to build
  270. closures for commands.  I wrote part of the implementation but never
  271. finished it.  I have mailed copies to carroll@udel.edu, who asked the
  272. question, and I will post them if there seems to be general interest.
  273.  
  274. ------------------------------
  275. Subject: -4- Is there a bibliography of material relating to these
  276.         programs?
  277.  
  278. A. With the Tcl distribution there is a Postscript version of a Usenix
  279. paper introducing Tcl.  With the Tk distribution, there is a Postscript
  280. version of a Usenix paper introducing Tk.
  281.  
  282.  
  283. Ousterhout, J.K., (1990) ``TCL: An Embeddable Command Language'', in
  284. the Proceedings of the 1990 Winter USENIX Conference, pp 133-146.
  285.  
  286. Ousterhout, J.K., (1990) ``An X11 Toolkit Based on the TCL Language'',
  287. in the Proceedings of the 1991 Winter USENIX Conference, pp 105-115.
  288.  
  289. Postscript file for introductory papers on Tcl and Tk are available in
  290. the public FTP area on sprite.berkeley.edu (Internet address
  291. 128.32.150.27).  To retrieve them, ftp to sprite (login "anonymous",
  292. password "guest") and type the following commands:
  293.  
  294. get tclUsenix90.ps
  295. get tkUsenix91.ps
  296. get tkF10.ps
  297.  
  298. (The last of these files is the contents of Figure 10 of the Tk paper)
  299.  
  300. If you have trouble retrieving the papers via FTP or printing them,
  301. send bmiller@sprite.berkeley.edu your U.S. Mail address and he'll mail
  302. you paper copies.
  303.  
  304. B. With the Expect distribution, there are several Postscript documents
  305. available which have been published.
  306.  
  307. "Curing Those Uncontrollable Fits of Interaction", Proceedings of the
  308. Summer 1990 USENIX Conference, Anaheim, CA, June 11-15, 1990.  (This
  309. paper is discussion of implementation, philosophy, and design.  It is
  310. pub/expect/seminal.ps.Z on ftp.cme.nist.gov.)
  311.  
  312. "Using expect to Automate System Administration Tasks", Proceedings of
  313. the 1990 USENIX Large Systems Administration Conference (LISA) IV,
  314. Colorado Springs, CO, October 17-19, 1990.  (This paper is discussion
  315. and examples, specifically aimed at system administrators.  It is
  316. pub/expect/sysadm.ps.Z on ftp.cme.nist.gov.)
  317.  
  318. "expect: Scripts for Controlling Interactive Programs", Computing
  319. Systems, Vol. 4, No. 2, University of California Press Journals, 1991.
  320. (A comprehensive paper of example scripts.  This paper is
  321. pub/expect/scripts.ps.Z on ftp.cme.nist.gov.)
  322.  
  323. C. A FrameMaker MIF file containing a Quick Reference guide to Tcl is
  324. available as barkley.berkeley.edu:/tcl/docs/QuickRef.tar.Z.  Thanks to
  325. "Jeff Tranter" <Jeff.Tranter@software.mitel.com> for contributing it.
  326.  
  327. D. PostScript versions of the man pages were provided by
  328. "Adrian Ho" <adrianho@barkley.berkeley.edu>.  These are available on
  329. barkley.berkeley.edu:/tcl/docs/tcl6.3.manps.tar.Z
  330. barkley.berkeley.edu:/tcl/docs/tclX6.2b.manps.tar.Z
  331. barkley.berkeley.edu:/tcl/docs/tk2.1.manps.tar.Z
  332.  
  333. E. An early draft of a text book based on Tcl and Tk, written by
  334. John Ousterhout and to be published in 1993 by Addison-Wesley is available as
  335. sprite.berkeley.edu:tcl/book.p1.ps.Z .  It is about 130 pages in length.
  336. This is ONLY a draft.
  337.  
  338. F. A series of PostScript versions of slides used in a tutorial on
  339. Tcl and Tk at the 1992 X Conference are available as
  340. sprite.berkeley.edu:tcl/talk[1-5].ps and tkSquare.c.
  341.  
  342. Additional bibliographic references are still being sought.
  343.  
  344. ------------------------------
  345. Subject: -5- Where do I report problems, bugs, or enhancements - or -
  346.         What is comp.lang.tcl?
  347.  
  348.     There are two alternatives for reporting bugs and problems.
  349. The first is the USENET news group comp.lang.tcl, an unmoderated USENET
  350. newsgroup, created for the discussion of the Tcl programming language
  351. and tools that embed it, such as the Tk toolkit for the X window
  352. system, expect, and Extended Tcl.  Please note that postings of source
  353. code to comp.lang.tcl do not get archived to barkley.berkeley.edu - if
  354. you want your code to be available from the User Contributions archive
  355. you will need to make arrangements for someone to ftp it there.  See
  356. elsewhere in the FAQ for more details on the archive site.
  357.  
  358.     The second would be to report problems, suggestions, new
  359. ideas, etc. to the author.  Email to
  360.  
  361. ouster@allspice.berkeley.edu (John Ousterhout)
  362.  
  363. will get comments to the author of Tcl and Tk - for other programs, email
  364. addresses are available either elsewhere in this part or part 3.
  365.  
  366.     Note: for those USENET-deprived individuals who are thus unable
  367. to read comp.lang.tcl, a small echoing mailing list is available.
  368. Contact John Ousterhout (see above for email address) for details.
  369.  
  370. ------------------------------
  371. Subject: -6- Where can I find the FAQ and who do I contact for more
  372.         information about it?
  373.  
  374.     I am going to attempt to keep a copy of this file up to date on
  375. barkley.berkeley.edu.  Also, I will be posting it on a regular basis to
  376. at least comp.lang.tcl and news.answers.
  377.  
  378.     If you have corrections, enhancements, modifications,
  379. clarifications, suggestions, ideas, new questions, new answers to
  380. questions which have never been asked, or something else that I have
  381. not covered above, contact me at lvirden@cas.org.
  382. --
  383. Larry W. Virden                 UUCP: osu-cis!chemabs!lvirden
  384. Same Mbox: BITNET: lvirden@cas  INET: lvirden@cas.org
  385. Personal: 674 Falls Place,   Reynoldsburg, OH 43068-1614
  386. --
  387. Larry W. Virden                 UUCP: osu-cis!chemabs!lvirden
  388. Same Mbox: BITNET: lvirden@cas  INET: lvirden@cas.org
  389. Personal: 674 Falls Place,   Reynoldsburg, OH 43068-1614
  390. Xref: bloom-picayune.mit.edu comp.lang.tcl:2077 news.answers:4541
  391. Newsgroups: comp.lang.tcl,news.answers
  392. Path: bloom-picayune.mit.edu!enterpoop.mit.edu!spool.mu.edu!caen!malgudi.oar.net!chemabs!lvirden
  393. From: lvirden@cas.org (Larry W. Virden)
  394. Subject: comp.lang.tcl Frequently Asked Questions (2/3)
  395.      (Last updated: November 8, 1992)
  396. Message-ID: <tcl.p2_724079551@cas.org>
  397. Followup-To: comp.lang.tcl
  398. Summary: A regular posting of the comp.lang.tcl Frequently Asked Questions
  399.     (FAQ) and their answers.  This is the second of three parts.
  400. Originator: lwv26@lwv26aws
  401. Keywords: tcl, expect, extended tcl, wish, tk
  402. Sender: lvirden@cas.org
  403. Supersedes: <tcl.p2_721227419@cas.org>
  404. Reply-To: lvirden@cas.org (Larry W. Virden)
  405. Organization: Chemical Abstracts Service
  406. References: <tcl.p1_724079551@cas.org>
  407. Date: Fri, 11 Dec 1992 13:13:31 GMT
  408. Approved: news-answers-request@MIT.Edu
  409. Expires: Sun, 24 Jan 1993 13:12:31 GMT
  410. Lines: 717
  411.  
  412. Archive-name: tcl-faq/part2
  413. Version: 2.5
  414. Last-modified: November 8, 1992
  415.  
  416. Please do not be offended if I neglect to acknowledge your contribution
  417. to this FAQ!  I sometimes forget to put an attribution in.  I especially
  418. try to add them if it appears that there is further experimentation or
  419. debugging being done though.
  420.  
  421. Index of questions:
  422.  
  423. 7. Questions on building Tcl and friends on your system
  424.     Q7a. Is there anywhere I can find help with the details of getting
  425.         Tcl to work on my machine?
  426.     Q7b. When I am trying to build Tcl, the link step says that some
  427.         of the functions Tcl needs are missing.
  428.     Q7c. Has anyone built Tcl 6.2 on an RS/6000 AIX 3.1?
  429.     Q7d. Has anyone gotten Tcl to compile under HP-UX?
  430.     Q7e. Has anyone gotten Tcl to compile under VMS?
  431.     Q7f. What does it take to get Tcl to compile under SCO Unix?
  432.     Q7g. When I try to run the tclTest I get format and scan errors
  433.         (NeXT, AIX, etc.)
  434.     Q7h. When I try to run tcl v6.2 tclTest under Irix 4.0.1 I get
  435.         lots of errors.
  436.     Q7i. Does anyone else have problems with Tcl on a Cray?
  437.     Q7j. Does anyone know how to get Tk to run on a SparcBook or other
  438.         laptop with a limited number of colors?
  439.     Q7k. What does it take to get Tcl/Tk to compile on 386bsd/Linux
  440.         or other Posix/ANSI C systems not already supported?
  441.  
  442. 8.  How, in Tcl, can I XXX:
  443.     Q8a. get association lists or property lists?
  444.     Q8b. call one proc with the multi parameter value returned by
  445.         another proc?
  446.     Q8c. pass an array into a proc?
  447.     Q8d. pipe output of a command back into a tcl parsing procedure?
  448.     Q8e. merge extended Tcl into other programs such as wish or expect?
  449.     Q8f. delete a procedure from within a script?
  450.     Q8g. get parray to recognize an array variable I have created
  451.         via upvar?
  452.     Q8h. get more than 7 digits of double precision?
  453.     Q8i. grab the command line whenever a non-built-in call is made?
  454.  
  455. 9.  How, in Tk, can I XXX:
  456.     Q9a. get my wish application to execute - I just get a wish prompt!
  457.     Q9b. get an application to also use libXt?
  458.     Q9c. ,using a machine with less than 8 bit color, run?
  459.     Q9d. set X11 resources for a wish application in an app-defaults file?
  460.     Q9e. change the X11 cursor?
  461.     Q9f. raise or lower a window?
  462.     Q9g. re-map a withdrawn window id?
  463.     Q9h. specify bitmap patterns on the command line instead of
  464.         as a file name?
  465.     Q9i. change the default class bindings?
  466.     Q9j. delete a binding?
  467.     Q9k. change a binding while it is being executed?
  468.     Q9l. bind the arrow key on my Sun keyboard?
  469.     Q9m. resize a listbox?
  470.     Q9n. select two items that are not adjacent in the listbox at
  471.         one time?
  472.     Q9o. select items in more than one tk listbox at a time?
  473.     Q9p. fill a canvas which is bounded by lines as opposed to a
  474.         shape like a polygon, oval, etc.?
  475.     Q9q. create a scrollable window of buttons?
  476.  
  477. End of FAQ Index
  478.  
  479. ------------------------------
  480. Subject: -7- Questions on building Tcl and friends on your system
  481.  
  482. Subject: -Q7a- Is there anywhere I can find help with the details of
  483.         getting Tcl to work on my machine?
  484.  
  485. A7a. Glad you asked!  Look in the Tcl distribution for the file called
  486. "porting.notes".  This will contain a collection of notes that various people
  487. have provided about porting Tcl to various machines and operating systems.
  488. There are also a file called "README" which should be read FIRST - before
  489. doing anything else with the code (this should always be one's first
  490. step with any package).  Finally, there is a "changes" file which details
  491. what has changed since the last release - be sure to read this to see
  492. what might need to change in your programs.
  493.  
  494. Subject: -Q7b- When I am trying to build Tcl, the link step says that
  495.         some of the functions Tcl needs (such as strtoul and
  496.         strerror) are missing.
  497.  
  498. A7b. Did you run the "config" program first, by doing a "csh ./config" or
  499. equivalent?
  500.  
  501. Tcl includes equivalents for the following functions and include files
  502. which may not be found on some systems:
  503.  
  504. dirent.h       limits.h          stdlib.h         string.h
  505.  
  506. opendir.c      strerror.c     strstr.c         strtol.c        strtoul.c
  507.  
  508. strtod.c
  509.  
  510. Subject: -Q7c- Has anyone built Tcl 6.x on an RS/6000 AIX 3.1?
  511.  
  512. A7c.  See porting notes - especially the note about strtoul.
  513.  
  514. One user got Tcl to compile with a few minor source modifications
  515. (for example, duplicate case statements for errno and signal symbols in
  516. tclUnixStr.c).
  517.  
  518. A few other problems arose in the tests.  One is caused by AIX printf
  519. not formatting %#x and %#o correctly when the value to be printed is
  520. zero:  they print "0x0" and "00" instead of "0" and "0" respectively.
  521. This was reported as not a problem in earlier releases.  No fixes have
  522. been posted.
  523.  
  524. Finally, a problem occurs in open.test.  test 13.6 hangs because "cat"
  525. on the RS6000 is unbuffered.  A workaround is to change the execution
  526. of "cat" in open.test to do a "cat -u".
  527.  
  528. Dov Grobgeld <dov@menora.weizmann.ac.il> provided info on creating tcl
  529. and tk shared libraries under AIX 3.1.5:
  530.  
  531. For tcl:
  532.  
  533. cc -o tkshar.o *.o -bE:tclshar.exp -bM:SRE -berok -lX11 -lm
  534. ar r libtclshr tclshar.o
  535.  
  536. For tk:
  537.  
  538. cc -o tkshar.o *.o -bE:tkshar.exp -bM:SRE -berok -Ltcl -lX11 -lm -ltclshr
  539. ar r libtkshr tkshar.o
  540.  
  541. where tckshar.exp and tkshar.exp had lists of the external functions.
  542.  
  543. Subject: -Q7d- Has anyone gotten Tcl to compile under HP-UX?
  544.  
  545. A7d. See the porting notes.
  546.  
  547. Subject: -Q7e- Has anyone gotten Tcl to compile under VMS?
  548.  
  549. A7e. Information from: derge@visacrd.ge.com (Gillmer J. Derge)
  550.  
  551. Date: 8 Jan 92 13:44:18 GMT
  552. Reply-To: derge@crd.ge.com
  553. Organization: GE Corporate R&D Center, Schenectady, NY
  554.  
  555. Here's a rough approximation of what I needed to do (pretty minor changes).
  556.  
  557. 1. As discussed in the Makefile, do not compile the files that make
  558. UNIX_OBJS (panic.c, tclEnv.c, tclGlob.c, tclUnixAZ.c, tclUnixStr.c and
  559. tclUnixUtil.c).  Furthermore, define the constant TCL_GENERIC_ONLY at
  560. compile-time.
  561.  
  562. 2. Don't believe everything you read in Makefiles :-) --
  563. TCL_GENERIC_ONLY doesn't really work.  You need to add an ifndef in
  564. tclCkalloc.c before the "#include tclUnix.h".  Also, in tclExpr.c,
  565. there's a reference to TCL_NO_UNIX that should be changed to
  566. TCL_GENERIC_ONLY.
  567.  
  568. 3. Finally, in order to run the test program (the test suite won't
  569. work, see below), you'll need to change the definition of initCmd in
  570. tclTest.c.  I chose the following, which should be more or less
  571. compatible with non-VAX systems:
  572.  
  573. #ifdef TCL_LIBRARY
  574. char *initCmd =
  575.     "if [file exists [info library]/init.tcl] {source [info
  576. library]/init.tcl}";
  577. #else
  578. char *initCmd =
  579.     "format {There is no Tcl library at this installation.  Continuing
  580. anyway.\n
  581. }";
  582. #endif
  583.  
  584.     There are a number of caveats to all this.  First of all, I did
  585. not port tk or Extended Tcl.  Furthermore, I think there may have been
  586. a release that I missed since I did it (6.1 vs 6.0).  Here's the RCS ID
  587. from my tclExpr.c, in case you want to compare yours.
  588.  
  589. static char rcsid[] = "$Header: /sprite/src/lib/tcl/RCS/tclExpr.c,v 1.29\
  590. 91/09/04 15:08:28 ouster Exp $ SPRITE (Berkeley)";
  591.  
  592.     And perhaps most importantly of all, as you may have gleaned
  593. from the compilation instructions, I did not do anything to port the
  594. Unix-related functions.  As a result, the standard test suite will not
  595. work.  You have to just try commands on your own.  I recently got mail
  596. from jkimball@src.honeywell.com (John Kimball) indicating that he may
  597. be working on just that problem.
  598.  
  599.     I've assumed a certain amount of C knowledge in the above.  If
  600. that's an invalid assumption, or your confused for any other reason,
  601. let me know, and I'll try to clear things up.  I'm guessing since you
  602. asked about porting tk and Extended Tcl that I probably haven't taken
  603. this as you would have liked, but maybe I've saved you at least a
  604. little effort.  I hope so.
  605.  
  606. Subject: -Q7f- What does it take to get Tcl to compile under SCO Unix?
  607.  
  608. A7f.    Add a "#undef select" to tkEvent.c, and remove the reference to
  609. TK_EXCEPTION around line 460 of main.c.
  610.  
  611. Tk uses its own scheme for allocating the border colors for its 3D
  612. widgets, which causes problems when running TK on a system with
  613. "PseudoColor" display class, and a 16-cell colormap.
  614.  
  615. If you can't go to eight bitplanes, you can instead start the server
  616. with a "-static" (Xsco) or "-analog" (Xsight) option, making the
  617. display class become "StaticColor".  This makes the entire colormap
  618. read-only, and it will return the color that most closely maps to the
  619. desired color as possible.
  620.  
  621. This information is from Keith Amann <Keith_Amann@stortek.com>
  622.  
  623. Subject: -Q7g- When I try to run the tclTest I get format and scan errors
  624.         (NeXT, AIX, etc.)
  625.  
  626. A7g.  That's a problem (scanf/printf) many systems seem to have.  Don't
  627. worry too much about it - just don't use these 'advanced' features.  If
  628. you're hacking C, you'll have the same problems.
  629.  
  630. Subject: -Q7h- When I try to run tcl v6.2 tclTest under Irix 4.0.1 I get
  631.         lots of errors.
  632.  
  633. A7h. There's a bug in the 4.0.1 optimizer that's fixed in 4.0.2.
  634. Compile tclVar.c using -O0 (no optimization).
  635.  
  636. Subject: -Q7i- Does anyone else have problems with Tcl on a Cray?
  637.  
  638. A7i. See the porting notes for a set of changes mentioned.  Also,
  639. Booker C. Bense <benseb@grumpy.sdsc.edu> reports that version 3.0.1.6
  640. has some real problems with char pointers, causing Tcl to crash.  Using
  641. version 3.0.2.1, things are much better, except for a minor formatting
  642. problem and serious problems with scan.
  643.  
  644. Subject: -Q7j- Does anyone know how to get Tk to run on a SparcBook or other
  645. laptop with a limited number of colors?
  646.  
  647. A7j.  On a SparcBook, if you start openwin (the OpenWindows server starting
  648. command) as:
  649.  
  650. openwin -dev "/dev/fb staticvis"
  651.  
  652. you get a static visual color model that Tk copes with better than the
  653. default.  Some things are ugly, but not as ugly as monochrome.
  654.  
  655. Subject: -Q7k- What does it take to get Tcl/Tk to compile on 386bsd/Linux
  656.         or other Posix/ANSI C systems not already supported?
  657.  
  658. A7k. Patches for 386BSD were posted to comp.lang.tcl back in Nov. 1992 to
  659. alt.sources.  See one of the ftp archive sites for this group for them.
  660. Basically, there were some setting of defines and a few places where
  661. const char * had to be used in place of char *.
  662.  
  663. ------------------------------
  664. Subject: -8-  How, in Tcl, can I XXX:
  665.  
  666. Subject: -Q8a-    association lists or property lists?
  667.  
  668. A8a. Use Extended Tcl arrays or keyed lists.
  669.  
  670. For example, if you did a:
  671.  
  672. keylset ttyFields ttyName tty1a
  673. keylset ttyFields baudRate 57600
  674. keylset ttyFields parity strip
  675.  
  676. And then an "echo $ttyFields", you'd get:
  677.  
  678.     {ttyName tty1a} {baudRate 57600} {parity strip}
  679.  
  680.  
  681. Subject: -Q8b-    call one proc with the multi parameter value returned by
  682.         another proc?
  683.  
  684. A8b. Assuming y requires multiple args and x returns multiple words, use
  685.     Tcl's eval command "eval y [x]"
  686.  
  687. Subject: -Q8c-    pass an array into a proc?
  688.  
  689. A8c. With upvar.
  690.  
  691. set argc 2
  692. set argv(0) zero
  693. set argv(1) one
  694. # print elements of an array
  695. proc a {
  696.   foreach element of a
  697.   echo the element
  698. }
  699.  
  700. proc a {arrayName} {
  701.     upvar $arrayName myArray
  702.  
  703.     foreach element [array names myArray] {
  704.        echo $element $myArray($element)
  705.     }
  706. }
  707.  
  708. Extended Tcl introduces a concept called keyed lists which are arrays
  709. made out of lists of key-value pairs and can be passed by value to routines,
  710. over networks, etc.
  711.  
  712. Subject: -Q8d-    pipe output of a command back into a tcl parsing
  713.         procedure?
  714.  
  715. A8d.  For example, to grep a pattern out of a range of files, one might
  716. do:
  717.  
  718. karl@NeoSoft.com (Karl Lehenbauer) writes:
  719.  
  720. set files [glob /home/cole/stats/*]
  721.  
  722. proc parseInfo { site } {
  723.    global files
  724.  
  725. #
  726. # site is chosen from a listbox earlier
  727.